package com.nebula.core.dsl.builder;


/**
 * @author zhangtao
 */
public interface LookUpStatementBuilder extends StatementBuilder {

    interface LookUpStatement extends LookUpStart, LookUpTypeOut, LookUpWhereOut, LookUpYieldOut {
    }

    interface LookUpStart extends LookUpType {

    }

    interface LookUpType {
        /**
         * 检点/边类型
         *
         * @param type
         * @return
         */
        LookUpTypeOut on(String type);
    }

    interface LookUpTypeOut extends LookUpWhere, LookUpYield {
    }

    interface LookUpWhere {
        /**
         * 检索and条件
         *
         * @param key
         * @param operator
         * @param value
         * @return
         */
        LookUpWhereOut and(String key, String operator, Object value);

        /**
         * 检索or条件
         *
         * @param key
         * @param operator
         * @param value
         * @return
         */
        LookUpWhereOut or(String key, String operator, Object value);
    }

    interface LookUpWhereOut extends LookUpWhere, LookUpYield {
    }

    interface LookUpYield {
        /**
         * 返回字段
         *
         * @param field
         * @param alias
         * @return
         */
        LookUpYieldOut yield(String field, String alias);

        /**
         * 返回字段
         *
         * @param field
         * @return
         */
        LookUpYieldOut yield(String field);
    }

    interface LookUpYieldOut extends LookUpYield, Build {

    }


}
